const prodPlugins = []
// 如果是生产环境则把所以打印语句都清除
if(process.env.NODE_ENV === 'production') {
  prodPlugins.push('transform-remove-console')
}

module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ],
  plugins: [
    [
      'component',
      {
        libraryName: 'element-plus',
        styleLibraryName: 'theme-chalk'
      }
    ],
    ...prodPlugins,
    'syntax-dynamic-import'
  ]
}
